<div class="user-regist" flyInOut>
    <form (ngSubmit)="regist()" novalidate #form="ngForm">
        <div class="form-group">
            <label for="name">昵称</label>
            <input required type="txt" class="form-control" maxlength="8" #name="ngModel" name="name"  placeholder="name" [(ngModel)]="user.name">
            <alert type="warning" *ngIf="form.submitted && !name.valid">姓名最多8位</alert>
        </div>
        <div class="form-group">
            <!--name 属性是必须的-->
            <label for="Email">邮箱地址</label>
            <!--#email="ngModel"定义ID用于获取校验状态-->
            <input  required type="email" class="form-control" name="email" #email="ngModel" placeholder="Email" [(ngModel)]="user.email">
             <!--warning 提示框-->
             <alert type="warning" *ngIf="form.submitted && !email.valid">请填写正确的邮箱</alert>
        </div>
        <div class="form-group">
            <label for="password">密码</label>
            <input required type="password" class="form-control" minlength="8" #password="ngModel" name="password"  placeholder="Password" [(ngModel)]="user.password">
            <alert type="warning" *ngIf="form.submitted && !password.valid">密码最少8位</alert>
        </div>
        <button type="submit" class="btn btn-default submitbt " >提交</button>
    </form>
</div>